(When) Are Lobbying Expenditures a Good Proxy for Lobbying Activity?
	Sebastian Thieme

Please contact Sebastian Thieme at <st1623@nyu.edu> if you have any problems with or questions about these replication files.

August 13, 2024

=============
INSTRUCTIONS
=============

The code file "produce_replication_log_file_PSRM_ST24.R" will run "Main_Results_and_Appendix_Results.R", which will reproduce all main and supplemental results, but will also divert all console output into a log file ("output/Replication_PSRM_ST24_log_file.txt"). To run it, please first set the working directory to match the location of the folder containing all replication files.

---

Information about the variables in the datasets "PSRM_main_dataset.rds", "lobbyist_time_reports.rds", "committee_hearing_appearances.rds", and "PSRM_full_dataset.rds" is available in the file codebook file ("codebook.txt"). Additional data sources are described under "Additional Data Sources" below. Information about the software and hardware specifications used to run the analyses is provided under "Software and Hardware Specifications" below.

---

The code file "Main_Results_and_Appendix_Results.R" will reproduce all main and supplemental results by running the relevant code files listed below via the "source()" command. If you are using "Main_Results_and_Appendix_Results.R", you will only need to first set the working directory to the main replication folder (containing "Data" and "Code_Files". If you are running the below files individually, you will need to make sure in each case that the working directory is set to match the location of the folder containing all replication files. 

---

The code file "Main_Results.R" produces the figure and main results in the article, including Figure 1. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")

---

The code file "Appendix_A1_1.R" produces results in Appendix Section A1.1. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")

--- The code file "Appendix_A1_2.R" produces the results in Appendix Section A1.2. It relies on the following file: 

"lob_lobbying.txt" (from OpenSecrets, located in "Data/Appendix_A1_2_and_A5_8/lobby_lda.zip")

---The code file Appendix_A1_3.R produces the results in Appendix Section A1.3, including Table A1. It relies on the following files: 

"Top Lobbying Firms_2017_OpenSecrets.csv" (from OpenSecrets, located in "Data/Appendix_A1_3/OpenSecrets_TopLobbyists/") ; 

"Top Lobbying Firms_2018_OpenSecrets.csv" (from OpenSecrets, located in "Data/Appendix_A1_3/OpenSecrets_TopLobbyists/") ;

Overview files (in csv format) for FARA AB filings located in: "Data/Appendix_A1_3/FARA/AB"

---The code file "Appendix_A5_1.R" produces the results in Appendix Section A5.1, including Figure A1. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")

---The code file "Appendix_A5_2-A5_4.R" produces the results in Appendix Sections A5.2, A5.3, and A5.4, including Tables A2 and A3. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")

---The code file "Appendix_A5_5-A5_7.R" produces the results in Appendix Sections A5.5, A5.6, and A5.7, including Figures A2, A3, and A4. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")

---The code file "Appendix_A5_8.R" produces the results in Appendix Section A5.8, including Figure A5 and Table A4. It relies on the following files: 

"lob_lobbyist.txt" (from OpenSecrets, located in "Data/Appendix_A1_2_and_A5_8/lobby_lda.zip");

"lob_lobbying.txt" (from OpenSecrets, located in "Data/Appendix_A1_2_and_A5_8/lobby_lda.zip");

"CRP_Categories.rds" (from OpenSecrets, located in "Data/Appendix_A1_2_and_A5_8");

State-level data (in csv format) on lobbying registrations from FollowTheMoney located in: "Data/Appendix_Sections_A1_2_and_A5_8/Lobbyist_registrations/2017"---
The code file "Appendix_A5_9.R" produces the results in Appendix Section A5.9, including Figure A6. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")---
The code file "Appendix_A6.R" produces the results in Appendix Section A.6, including Figures A7 and A8. It relies on the following file: 

"PSRM_main_dataset.rds" (located in "Data")---The code file "Appendix_A7.R" produces the results in Appendix Section A7, including Figure A9. It relies on the following files:

"PSRM_main_dataset.rds" (located in "Data") ; 

"lobbyist_time_reports.rds" (located in "Data/Appendix_A7");

"committee_hearing_appearances.rds" (located in "Data/Appendix_A7")
 

=========================
Additional Data Sources:
=========================


OpenSecrets
===========

The files "Top Lobbying Firms_2017_OpenSecrets.csv" and "Top Lobbying Firms_2018_OpenSecrets.csv" were downloaded from the OpenSecrets website: "https://www.opensecrets.org/federal-lobbying/top-lobbying-firms" and selecting years 2017 and 2018.

OpenSecrets. 2024. "Top Lobbying Firms." URL: "https://www.opensecrets.org/federal-lobbying/top-lobbying-firms" (accessed April 17, 2024)

---

The files "lob_lobbyist.txt" and "lob_lobbying.txt" were downloaded from "https://www.opensecrets.org/bulk-data/downloads".

OpenSecrets. 2021. "Lobbying Data." URL: "https://www.opensecrets.org/bulk-data/downloads" (accessed July 25, 2022).

---

The data in file "CRP_Categories.rds" come from "https://www.opensecrets.org/downloads/crp/CRP_Categories.txt."

OpenSecrets. 2022. "CRP Categories." URL: "https://www.opensecrets.org/downloads/crp/CRP_Categories.txt" (accessed July 26, 2022).

---

Data on Names of Registered Lobbyists/Clients in 50 states in 2017, downloaded from "https://www.followthemoney.org/tools/lobbyist-link?s=AL&y=2017" -- "https://www.followthemoney.org/tools/lobbyist-link?s=WY&y=2017" 

OpenSecrets. 2023. "Lobbyist Link." URL: "https://www.followthemoney.org/tools/lobbyist-link" (accessed December 8-11, 2023).


U.S. Bureau of Labor Statistics
===============================

The file "PSRM_main_dataset.rds" contains data from the following source:

U.S. Bureau of Labor Statistics, Consumer Price Index for All Urban Consumers: Education and Communication in Chicago-Naperville-Elgin, IL-IN-WI (CBSA) [CUURA207SAE], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/CUURA207SAE, March 30, 2020


U.S. Department of Justice
==========================

The overview files for lobbying companies and the Foreign Agents Registration Act filings come from the website of the United States Department of Justice.

United States Department of Justice. 2024. "Foreign Agents Registration Act Filings (A&B)". URL: "https://efile.fara.gov/ords/fara/f?p=1235:10" (accessed April 16-April 23, 2024).


====================================
Software and Hardware Specifications
====================================

The analyses were run using R on a MacBook Pro computer (details below).

Details about R version (returned values from R command "R.version"):

platform       x86_64-apple-darwin20       
arch           x86_64                      
os             darwin20                    
system         x86_64, darwin20            
status                                     
major          4                           
minor          4.0                         
year           2024                        
month          04                          
day            24                          
svn rev        86474                       
language       R                           
version.string R version 4.4.0 (2024-04-24)
nickname       Puppy Cup 

---

Details about system (selected values from R command "Sys.info()"):

sysname                                                                                                   Darwin
release                                                                                                   21.6.0
version        Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; root:xnu-8020.140.41~1/RELEASE_X86_64
machine                                                                                                   x86_64

---

Information from "About This Mac":

Operating System: macOS Monterey (Version 12.5)
Computer:         MacBookPro (16-Inch, 2019)
Processor:        2.6 GHz 6-Core Intel Core i7
Memory:           16 GB 2667 MHz DDR4


